home *** CD-ROM | disk | FTP | other *** search
- /*
- File: OCEMail.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __OCEMAIL__
- #define __OCEMAIL__
-
- #ifndef __DIGITALSIGNATURE__
- #include "DigitalSignature.h"
- /* #include <Files.h> */
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- /* #include <OSUtils.h> */
- /* #include <SegLoad.h> */
- /* #include <Memory.h> */
- #endif
-
- #ifndef __FILES__
- #endif
-
- #ifndef __MEMORY__
- #endif
-
- #ifndef __OCE__
- #include "OCE.h"
- /* #include <Aliases.h> */
- /* #include <AppleTalk.h> */
- /* #include <AppleEvents.h> */
- /* #include <Events.h> */
- /* #include <Quickdraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include <EPPC.h> */
- /* #include <PPCToolBox.h> */
- /* #include <Processes.h> */
- /* #include <Notification.h> */
- /* #include <Script.h> */
- #endif
-
- #ifndef __OCEAUTHDIR__
- #include "OCEAuthDir.h"
- #endif
-
- #ifndef __OCEMESSAGING__
- #include "OCEMessaging.h"
- #endif
-
- #ifndef __TEXTEDIT__
- #include <TextEdit.h>
- #endif
-
- #ifndef __TYPES__
- #endif
-
- /**************************************************************************************/
- /* Common Definitions */
- /**************************************************************************************/
-
- typedef union MSAMParam MSAMParam;
-
- /*
- MSAMIOCompletionProcs cannot be written in or called from a high-level
- language without the help of mixed mode or assembly glue because they
- use the following parameter-passing convention:
-
- typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam* paramBlock);
-
- In:
- => paramBlock A0.L
- Out:
- none
- */
-
- enum {
- uppMSAMIOCompletionProcInfo = kRegisterBased|REGISTER_ROUTINE_PARAMETER(1,kRegisterA0,kFourByteCode)
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam* paramBlock);
-
- typedef UniversalProcPtr MSAMIOCompletionUPP;
-
- #define CallMSAMIOCompletionProc(userRoutine, paramBlock) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
-
- #define NewMSAMIOCompletionProc(userRoutine) \
- (MSAMIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
- uppMSAMIOCompletionProcInfo, GetCurrentISA())
-
- #else
- typedef ProcPtr MSAMIOCompletionUPP;
-
- #define NewMSAMIOCompletionProc(userRoutine) \
- (MSAMIOCompletionUPP)((userRoutine))
-
- #endif
- #define MailParamBlockHeader \
- Ptr qLink; \
- long reservedH1; \
- long reservedH2; \
- MSAMIOCompletionUPP ioCompletion; \
- OSErr ioResult; \
- long saveA5; \
- short reqCode;
-
- typedef long MailMsgRef; /* reference to a new or open letter or message */
-
- typedef long MSAMQueueRef; /* reference to an open msam queue */
- typedef unsigned short MSAMSlotID; /* identifies slots managed by a PMSAM */
-
- typedef long MailboxRef; /* reference to an active mailbox */
- typedef unsigned short MailSlotID; /* identifies slots within a mailbox */
-
- /* identifies a letter in a mailbox */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailSeqNum {
- MailSlotID slotID;
- long seqNum;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailSeqNum MailSeqNum;
-
- /* A MailBuffer is used to describe a buffer used for an IO operation.
- The location of the buffer is pointed to by 'buffer'.
- When reading, the size of the buffer is 'bufferSize'
- and the size of data actually read is 'dataSize'.
- When writing, the size of data to be written is 'bufferSize'
- and the size of data actually written is 'dataSize'.
- */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailBuffer {
- long bufferSize;
- Ptr buffer;
- long dataSize;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailBuffer MailBuffer;
-
- /* A MailReply is used to describe a commonly used reply buffer format.
- It contains a count of tuples followed by an array of tuples.
- The format of the tuple itself depends on each particular call.
- */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailReply {
- unsigned short tupleCount;
- /* tuple[tupleCount] */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailReply MailReply;
-
- /* Shared Memory Communication Area used when Mail Manager sends
- High Level Events to a PMSAM.
- */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMCA {
- unsigned short smcaLength; /* includes size of smcaLength field */
- OSErr result;
- long userBytes;
- union {
- CreationID slotCID; /* for create/modify/delete slot calls */
- long msgHint; /* for kMailEPPCMsgOpened */
- } u;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMCA SMCA;
-
- /* Value of creator and types fields for messages and blocks defined by MailManager */
- #define kMailAppleMailCreator 'apml' /* message and letter block creator */
-
- #define kMailLtrMsgType 'lttr' /* message type of letters, reports */
- #define kMailLtrHdrType 'lthd' /* contains letter header */
- #define kMailContentType 'body' /* contains content of letter */
- #define kMailEnclosureListType 'elst' /* contains list of enclosures */
- #define kMailEnclosureDesktopType 'edsk' /* contains desktop mgr info for enclosures */
-
- #define kMailEnclosureFileType 'asgl' /* contains a file enclosure */
- /* format is defined by AppleSingle */
-
- #define kMailImageBodyType 'imag' /* contains image of letter */
- /* format is struct TPfPgDir - in Printing.h
- * struct TPfPgDir {
- * short pageCount; - number of pages in the image.
- * long iPgPos[129]; - iPgPos[n] is the offset from the start of the block
- * - to image of page n.
- * - iPgPos[n+1] - iPgPos[n] is the length of page n.
- */
-
- #define kMailMSAMType 'gwyi' /* contains msam specific information */
-
- #define kMailTunnelLtrType 'tunl' /* used to read a tunnelled message */
- #define kMailHopInfoType 'hopi' /* used to read hopInfo for a tunnelled message */
-
- #define kMailReportType 'rpti' /* contains report info */
- /*
- Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
- This block has a header, IPMReportBlockHeader,
- followed by an array of elements, each of type IPMRecipientReport
- */
-
- /* Various families used by mail or related msgs */
- #define kMailFamily 'mail' /* Defines family of "mail" msgs: content, header, etc */
- #define kMailFamilyFile 'file' /* Defines family of "direct display" msgs */
-
- typedef unsigned short MailAttributeID;
-
- /* Values of MailAttributeID */
- /* Message store attributes - stored in the catalog */
- /* Will always be present in a letter and have fixed sizes */
- enum {
- kMailLetterFlagsBit = 1, /* MailLetterFlags */
-
- /* Letter attributes - stored in the letter */
- /* Will always be present in a letter and have fixed sizes */
- kMailIndicationsBit = 3, /* MailIndications */
- kMailMsgTypeBit = 4, /* OCECreatorType */
- kMailLetterIDBit = 5, /* MailLetterID */
- kMailSendTimeStampBit = 6, /* MailTime */
- kMailNestingLevelBit = 7, /* MailNestingLevel */
- kMailMsgFamilyBit = 8, /* OSType */
-
- /* Letter attributes - stored in the letter */
- /* May be present in a letter and have fixed sizes */
- kMailReplyIDBit = 9, /* MailLetterID */
- kMailConversationIDBit = 10, /* MailLetterID */
-
- /* Letter attributes - stored in the letter */
- /* May be present in a letter and have variable length sizes */
- kMailSubjectBit = 11, /* RString */
- kMailFromBit = 12, /* MailRecipient */
- kMailToBit = 13, /* MailRecipient */
- kMailCcBit = 14, /* MailRecipient */
- kMailBccBit = 15 /* MailRecipient */
- };
-
- typedef unsigned long MailAttributeMask;
-
- /* Values of MailAttributeMask */
- enum {
- kMailLetterFlagsMask = 1L << (kMailLetterFlagsBit - 1),
- kMailIndicationsMask = 1L << (kMailIndicationsBit - 1),
- kMailMsgTypeMask = 1L << (kMailMsgTypeBit - 1),
- kMailLetterIDMask = 1L << (kMailLetterIDBit - 1),
- kMailSendTimeStampMask = 1L << (kMailSendTimeStampBit - 1),
- kMailNestingLevelMask = 1L << (kMailNestingLevelBit - 1),
- kMailMsgFamilyMask = 1L << (kMailMsgFamilyBit - 1),
- kMailReplyIDMask = 1L << (kMailReplyIDBit - 1),
- kMailConversationIDMask = 1L << (kMailConversationIDBit - 1),
- kMailSubjectMask = 1L << (kMailSubjectBit - 1),
- kMailFromMask = 1L << (kMailFromBit - 1),
- kMailToMask = 1L << (kMailToBit - 1),
- kMailCcMask = 1L << (kMailCcBit - 1),
- kMailBccMask = 1L << (kMailBccBit - 1)
- };
-
- typedef unsigned long MailAttributeBitmap;
-
- typedef unsigned short MailLetterSystemFlags;
-
- /* Values of MailLetterSystemFlags */
- enum {
- kMailIsLocalBit =2 /* letter is available locally (either by nature or via cache) */
- };
-
- enum {
- kMailIsLocalMask = 1L << kMailIsLocalBit
- };
-
- typedef unsigned short MailLetterUserFlags;
-
- enum {
- kMailReadBit, /* this letter has been opened */
- kMailDontArchiveBit, /* this letter is not */
- /* to be archived either because */
- /* it has already been archived or */
- /* it should not be archived. */
- kMailInTrashBit /* this letter is in trash */
- };
-
- /* Values of MailLetterUserFlags */
- enum {
- kMailReadMask = 1L << kMailReadBit,
- kMailDontArchiveMask = 1L << kMailDontArchiveBit,
- kMailInTrashMask = 1L << kMailInTrashBit
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailLetterFlags {
- MailLetterSystemFlags sysFlags;
- MailLetterUserFlags userFlags;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailLetterFlags MailLetterFlags;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailMaskedLetterFlags {
- MailLetterFlags flagMask; /* flags that are to be set */
- MailLetterFlags flagValues; /* and their values */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
-
- enum {
- kMailOriginalInReportBit = 1,
- kMailNonReceiptReportsBit = 3,
- kMailReceiptReportsBit = 4,
- kMailForwardedBit = 5,
- kMailPriorityBit = 6,
- kMailIsReportWithOriginalBit = 8,
- kMailIsReportBit = 9,
- kMailHasContentBit = 10,
- kMailHasSignatureBit = 11,
- kMailAuthenticatedBit = 12,
- kMailSentBit = 13
- };
-
- /* Values of MailIndications */
- enum {
- kMailSentMask = 1L << (kMailSentBit - 1),
- kMailAuthenticatedMask = 1L << (kMailAuthenticatedBit - 1),
- kMailHasSignatureMask = 1L << (kMailHasSignatureBit - 1),
- kMailHasContentMask = 1L << (kMailHasContentBit - 1),
- kMailIsReportMask = 1L << (kMailIsReportBit - 1),
- kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
- kMailPriorityMask = 3L << (kMailPriorityBit - 1),
- kMailForwardedMask = 1L << (kMailForwardedBit - 1),
- kMailReceiptReportsMask = 1L << (kMailReceiptReportsBit - 1),
- kMailNonReceiptReportsMask = 1L << (kMailNonReceiptReportsBit - 1),
- kMailOriginalInReportMask = 3L << (kMailOriginalInReportBit - 1)
- };
-
- typedef unsigned long MailIndications;
-
- /* values of the field originalInReport in MailIndications */
- enum {
- kMailNoOriginal = 0, /* do not enclose original in reports */
- kMailEncloseOnNonReceipt = 3 /* enclose original in non-delivery reports */
- };
-
- typedef IPMMsgID MailLetterID;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailTime {
- UTCTime time; /* current UTC(GMT) time */
- UTCOffset offset; /* offset from GMT */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailTime MailTime;
-
- typedef unsigned short MailNestingLevel; /* innermost letter has nestingLevel 0 */
-
- typedef OCERecipient MailRecipient;
-
- enum {
- kMailTextSegmentBit,
- kMailPictSegmentBit,
- kMailSoundSegmentBit,
- kMailStyledTextSegmentBit,
- kMailMovieSegmentBit
- };
-
- typedef unsigned short MailSegmentMask;
-
- /* Values of MailSegmentMask */
- enum {
- kMailTextSegmentMask = 1L << kMailTextSegmentBit,
- kMailPictSegmentMask = 1L << kMailPictSegmentBit,
- kMailSoundSegmentMask = 1L << kMailSoundSegmentBit,
- kMailStyledTextSegmentMask = 1L << kMailStyledTextSegmentBit,
- kMailMovieSegmentMask = 1L << kMailMovieSegmentBit
- };
-
- typedef unsigned short MailSegmentType;
-
- /* Values of MailSegmentType */
- enum {
- kMailInvalidSegmentType = 0,
- kMailTextSegmentType = 1,
- kMailPictSegmentType = 2,
- kMailSoundSegmentType = 3,
- kMailStyledTextSegmentType = 4,
- kMailMovieSegmentType = 5
- };
-
- #define kMailErrorLogEntryVersion 0x101
-
- #define kMailMSAMErrorStringListID 128 /* These 'STR#' resources should be */
- #define kMailMSAMActionStringListID 129 /* in the PMSAM resource fork */
-
- typedef unsigned short MailLogErrorType;
-
- /* Values of MailLogErrorType */
- enum {
- kMailELECorrectable = 0,
- kMailELEError = 1,
- kMailELEWarning = 2,
- kMailELEInformational = 3
- };
-
- typedef short MailLogErrorCode;
-
- /* Values of MailLogErrorCode */
- enum {
- /* positive codes are indices into */
- /* PMSAM defined strings */
- kMailMSAMErrorCode = 0,
- kMailMiscError = -1, /* negative codes are OCE defined */
- kMailNoModem = -2 /* modem required, but missing */
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- /* < 128 bytes */
- struct MailErrorLogEntryInfo {
- short version;
- UTCTime timeOccurred; /* do not fill in */
- Str31 reportingPMSAM; /* do not fill in */
- Str31 reportingMSAMSlot; /* do not fill in */
- MailLogErrorType errorType;
- MailLogErrorCode errorCode;
- short errorResource; /* resources are valid if */
- short actionResource; /* errorCode = kMailMSAMErrorCode */
- /* index starts from 1 */
- unsigned long filler;
- unsigned short filler2;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
-
- typedef short MailBlockMode;
-
- /* Values of MailBlockMode */
- enum {
- kMailFromStart = 1, /* write data from offset calculated from */
- kMailFromLEOB = 2, /* start of block, end of block, */
- kMailFromMark = 3 /* or from the current mark */
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailEnclosureInfo {
- StringPtr enclosureName;
- CInfoPBPtr catInfo;
- StringPtr comment;
- Ptr icon;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailEnclosureInfo MailEnclosureInfo;
-
- enum {
- kOCESetupLocationNone = 0, /* disconnect state */
- kOCESetupLocationMax = 8 /* maximum location value */
- };
-
- typedef char OCESetupLocation;
-
- /* location state is a bitmask, 0x1=>1st location active,
- * 0x2 => 2nd, 0x4 => 3rd, etc.
- */
- #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
- typedef unsigned char MailLocationFlags;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailLocationInfo {
- OCESetupLocation location;
- MailLocationFlags active;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailLocationInfo MailLocationInfo;
-
- /**************************************************************************************/
- /* Definitions for Personal MSAMs */
- /**************************************************************************************/
-
- #define kMailEPPCMsgVersion 3
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailEPPCMsg {
- short version;
- union {
- SMCA *theSMCA; /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
- long sequenceNumber; /* for 'inqu', 'dlom' */
- MailLocationInfo locationInfo; /* for 'locc' */
- } u;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailEPPCMsg MailEPPCMsg;
-
- /* Values of OCE defined High Level Event message classes */
- enum {
- kMailEPPCCreateSlot = 'crsl',
- kMailEPPCModifySlot = 'mdsl',
- kMailEPPCDeleteSlot = 'dlsl',
- kMailEPPCShutDown = 'quit',
- kMailEPPCMailboxOpened = 'mbop',
- kMailEPPCMailboxClosed = 'mbcl',
- kMailEPPCMsgPending = 'msgp',
- kMailEPPCSendImmediate = 'sndi',
- kMailEPPCContinue = 'cont',
- kMailEPPCSchedule = 'sked',
- kMailEPPCAdmin = 'admn',
- kMailEPPCInQUpdate = 'inqu',
- kMailEPPCMsgOpened = 'msgo',
- kMailEPPCDeleteOutQMsg = 'dlom',
- kMailEPPCWakeup = 'wkup',
- kMailEPPCLocationChanged = 'locc'
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- union MailTimer {
- long frequency; /* how often to connect */
- long connectTime; /* time since midnight */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef union MailTimer MailTimer;
-
- enum {
- kMailTimerOff = 0, /* control is off */
- kMailTimerTime = 1, /* specifies connect time (relative to midnight) */
- kMailTimerFrequency = 2 /* specifies connect frequency */
- };
-
- typedef Byte MailTimerKind;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailTimers {
- MailTimerKind sendTimeKind; /* either kMailTimerTime or kMailTimerFrequency */
- MailTimerKind receiveTimeKind; /* either kMailTimerTime or kMailTimerFrequency */
- MailTimer send;
- MailTimer receive;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailTimers MailTimers;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailStandardSlotInfoAttribute {
- short version;
- MailLocationFlags active; /* active if MailLocationMask(i) is set */
- Byte padByte;
- MailTimers sendReceiveTimer;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMGetMSAMRecordPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- CreationID msamCID;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMOpenQueuesPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef inQueueRef;
- MSAMQueueRef outQueueRef;
- MSAMSlotID msamSlotID;
- long filler[2];
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
-
- typedef unsigned short PMSAMStatus;
-
- /* Values of PMSAMStatus */
- enum {
- kPMSAMStatusPending = 1, /* for inQueue and outQueue */
- kPMSAMStatusError = 2, /* for inQueue and outQueue */
- kPMSAMStatusSending = 3, /* for outQueue only */
- kPMSAMStatusCaching = 4, /* for inQueue only */
- kPMSAMStatusSent = 5 /* for outQueue only */
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMSetStatusPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- long seqNum;
- long msgHint; /* for posting cache error,set this to 0 when report outq status */
- PMSAMStatus status;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMLogErrorPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMSlotID msamSlotID; /* 0 for PMSAM errors */
- MailErrorLogEntryInfo *logEntry;
- long filler[2];
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
-
- #define kMailMsgSummaryVersion 1
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailMasterData {
- MailAttributeBitmap attrMask; /* indicates attributes present in MsgSummary */
- MailLetterID messageID;
- MailLetterID replyID;
- MailLetterID conversationID;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailMasterData MailMasterData;
-
- #define kAddressedAs_TO 0x1
- #define kAddressedAs_CC 0x2
- #define kAddressedAs_BCC 0x4
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailCoreData {
- MailLetterFlags letterFlags;
- unsigned long messageSize;
- MailIndications letterIndications;
- OCECreatorType messageType;
- MailTime sendTime;
- OSType messageFamily;
- unsigned char reserved;
- unsigned char addressedToMe;
- char agentInfo[6]; /* 6 bytes of special info [set to zero] */
- /* these are variable length and even padded */
- RString32 sender; /* recipient's entityName (trunc)*/
- RString32 subject; /* subject maybe truncated */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailCoreData MailCoreData;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMMsgSummary {
- short version; /* following flags are defaulted by Toolbox */
- Boolean msgDeleted; /* true if msg is to be deleted by PMSAM */
- Boolean msgUpdated; /* true if msgSummary was updated by MailManager */
- Boolean msgCached; /* true if msg is in the slot's InQueue */
- Byte padByte;
- MailMasterData masterData;
- MailCoreData coreData;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMMsgSummary MSAMMsgSummary;
-
- #define kMailMaxPMSAMMsgSummaryData 128 /* PMSAM can put up to 128 bytes of private msg summary data */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMCreateMsgSummaryPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef inQueueRef;
- long seqNum; /* <- seq of the new message */
- MSAMMsgSummary *msgSummary; /* attributes and mask filled in */
- MailBuffer *buffer; /* PMSAM specific data to be appended */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMPutMsgSummaryPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef inQueueRef;
- long seqNum;
- MailMaskedLetterFlags *letterFlags; /* if not nil, then set msgStoreFlags */
- MailBuffer *buffer; /* PMSAM specific data to be overwritten */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PMSAMGetMsgSummaryPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef inQueueRef;
- long seqNum;
- MSAMMsgSummary *msgSummary; /* if not nil, then read in the msgSummary */
- MailBuffer *buffer; /* PMSAM specific data to be read */
- unsigned short msgSummaryOffset; /* offset of PMSAM specific data from start of MsgSummary */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
-
- /****************************************************************************************/
- /* Definitions for Server MSAMs */
- /**************************************************************************************/
-
- typedef unsigned short SMSAMAdminCode;
-
- /* Values of SMSAMAdminCode */
- enum {
- kSMSAMNotifyFwdrSetupChange = 1,
- kSMSAMNotifyFwdrNameChange = 2,
- kSMSAMNotifyFwdrPwdChange = 3,
- kSMSAMGetDynamicFwdrParams = 4
- };
-
- typedef unsigned long SMSAMSlotChanges;
-
- enum {
- kSMSAMFwdrHomeInternetChangedBit,
- kSMSAMFwdrConnectedToChangedBit,
- kSMSAMFwdrForeignRLIsChangedBit,
- kSMSAMFwdrMnMServerChangedBit
- };
-
- /* Values of SMSAMSlotChanges */
- enum {
- kSMSAMFwdrEverythingChangedMask = -1,
- kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
- kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
- kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
- kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
- };
-
-
- /* kSMSAMNotifyFwdrSetupChange */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMSetupChange {
- SMSAMSlotChanges whatChanged; /* --> bitmap of what parameters changed */
- AddrBlock serverHint; /* --> try this ADAP server first */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMSetupChange SMSAMSetupChange;
-
- /* kSMSAMNotifyFwdrNameChange */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMNameChange {
- RString newName; /* --> msams new name */
- AddrBlock serverHint; /* --> try this ADAP server first */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMNameChange SMSAMNameChange;
-
- /* kSMSAMNotifyFwdrPasswordChange */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMPasswordChange {
- RString newPassword; /* --> msams new password */
- AddrBlock serverHint; /* --> try this ADAP server first */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMPasswordChange SMSAMPasswordChange;
-
- /* kSMSAMGetDynamicFwdrParams */
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMDynamicParams {
- unsigned long curDiskUsed; /* <-- amount of disk space used by msam */
- unsigned long curMemoryUsed; /* <-- amount of memory used by msam */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMDynamicParams SMSAMDynamicParams;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMAdminEPPCRequest {
- SMSAMAdminCode adminCode;
- union {
- SMSAMSetupChange setupChange;
- SMSAMNameChange nameChange;
- SMSAMPasswordChange passwordChange;
- SMSAMDynamicParams dynamicParams;
- } u;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMSetupPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- RecordIDPtr serverMSAM;
- RStringPtr password;
- OSType gatewayType;
- RStringPtr gatewayTypeDescription;
- AddrBlock catalogServerHint;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMSetupPB SMSAMSetupPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMStartupPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- AuthIdentity msamIdentity;
- MSAMQueueRef queueRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMStartupPB SMSAMStartupPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SMSAMShutdownPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SMSAMShutdownPB SMSAMShutdownPB;
-
- /****************************************************************************************/
- /* Definitions for reading and writing MSAM Letters */
- /****************************************************************************************/
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMEnumeratePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- long startSeqNum;
- long nextSeqNum;
- MailBuffer buffer;
- /* buffer contains a Mail Reply. Each tuple is a
- MSAMEnumerateInQReply when enumerating the inQueue
- MSAMEnumerateOutQReply when enumerating the outQueue
- */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMEnumeratePB MSAMEnumeratePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMEnumerateInQReply {
- long seqNum;
- Boolean msgDeleted; /* true if msg is to be deleted by PMSAM */
- Boolean msgUpdated; /* true if MsgSummary has been updated by TB */
- Boolean msgCached; /* true if msg is in the incoming queue */
- Byte padByte;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMEnumerateOutQReply {
- long seqNum;
- Boolean done; /* true if all responsible recipients have been processed */
- IPMPriority priority;
- OSType msgFamily;
- long approxSize;
- Boolean tunnelForm; /* true if this letter has to be tunnelled */
- Byte padByte;
- NetworkSpec nextHop; /* valid if tunnelForm is true */
- OCECreatorType msgType;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMDeletePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- long seqNum;
- Boolean msgOnly; /* only valid for PMSAM & inQueue */
- /* set true to delete message but not msgSummary */
- Byte padByte;
- OSErr result; /* only valid for SMSAM & tunnelled messages */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMDeletePB MSAMDeletePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMOpenPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- long seqNum;
- MailMsgRef mailMsgRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMOpenPB MSAMOpenPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMOpenNestedPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailMsgRef nestedRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMClosePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMClosePB MSAMClosePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetMsgHeaderPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- IPMHeaderSelector selector;
- unsigned long offset;
- MailBuffer buffer;
- unsigned long remaining;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetAttributesPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailAttributeBitmap requestMask; /* kMailIndicationsBit thru kMailSubjectBit */
- MailBuffer buffer;
- /* buffer returned will contain the attribute values of
- the attributes indicated in responseMask,
- from the attribute indicated by the least significant bit set
- to the attribute indicated by the most significant bit set.
- Note that recipients - from, to, cc, bcc cannot be read using
- this call. Use GetRecipients to read these.
- */
- MailAttributeBitmap responseMask;
- Boolean more;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
-
- #define kMailResolvedList 0 /* attrID value to get resolved recipient list */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailOriginalRecipient {
- short index;
- /* Followed by OCEPackedRecipient */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailOriginalRecipient MailOriginalRecipient;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailResolvedRecipient {
- short index;
- short recipientFlags;
- Boolean responsible;
- Byte padByte;
- /* Followed by OCEPackedRecipient */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailResolvedRecipient MailResolvedRecipient;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetRecipientsPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailAttributeID attrID; /* kMailFromBit thru kMailBccBit */
- unsigned short startIndex; /* starts at 1 */
- MailBuffer buffer;
- /* buffer contains a Mail Reply. Each tuple is a
- MailOriginalRecipient if getting original recipients
- ie the attrID is kMail[From, To, Cc, Bcc]Bit
- MailResolvedRecipient if getting resolved reicpients
- ie the attrID is kMailResolvedList
- Both tuples are word alligned.
- */
- unsigned short nextIndex;
- Boolean more;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetContentPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailSegmentMask segmentMask;
- MailBuffer buffer;
- StScrpRec *textScrap;
- ScriptCode script;
- MailSegmentType segmentType;
- Boolean endOfScript;
- Boolean endOfSegment;
- Boolean endOfContent;
- long segmentLength; /* NEW: <- valid first call in a segment */
- long segmentID; /* NEW: <-> identifier for this segment */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetContentPB MSAMGetContentPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetEnclosurePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- Boolean contentEnclosure;
- Byte padByte;
- MailBuffer buffer;
- Boolean endOfFile;
- Boolean endOfEnclosures;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailBlockInfo {
- OCECreatorType blockType;
- unsigned long offset;
- unsigned long blockLength;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailBlockInfo MailBlockInfo;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMEnumerateBlocksPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- unsigned short startIndex; /* starts at 1 */
- MailBuffer buffer; /* buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
- unsigned short nextIndex;
- Boolean more;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMGetBlockPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- OCECreatorType blockType;
- unsigned short blockIndex;
- MailBuffer buffer;
- unsigned long dataOffset;
- Boolean endOfBlock;
- Byte padByte;
- unsigned long remaining;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMGetBlockPB MSAMGetBlockPB;
-
- /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
- * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
- * REASONS.
- */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- /* not valid for tunnel form letters */
- struct MSAMMarkRecipientsPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- long seqNum;
- MailBuffer buffer;
- /* buffer contains a Mail Reply. Each tuple is an unsigned short,
- the index of a recipient to be marked.
- */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
-
- /*
- * same as MSAMMarkRecipients except it takes a mailMsgRef instead of
- * queueRef, seqNum
- */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMnMarkRecipientsPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailBuffer buffer;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMCreatePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef;
- Boolean asLetter; /* indicate if we should create as letter or msg */
- IPMMsgType msgType; /* up to application discretion: must be of IPMSenderTag */
- /* kIPMOSFormatType for asLetter=true */
- long refCon; /* for messages only */
- long seqNum; /* set if creating message in the inQueue */
- Boolean tunnelForm; /* if true tunnelForm else newForm */
- Boolean bccRecipients; /* true if creating letter with bcc recipients */
- MailMsgRef newRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMCreatePB MSAMCreatePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMBeginNestedPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- long refCon; /* for messages only */
- IPMMsgType msgType;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMEndNestedPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMEndNestedPB MSAMEndNestedPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMSubmitPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- Boolean submitFlag;
- Byte padByte;
- MailLetterID msgID;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMSubmitPB MSAMSubmitPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutMsgHeaderPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- OCERecipient *replyQueue;
- IPMSender *sender;
- IPMNotificationType deliveryNotification;
- IPMPriority priority;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutAttributePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailAttributeID attrID; /* kMailIndicationsBit thru kMailSubjectBit */
- MailBuffer buffer;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutAttributePB MSAMPutAttributePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutRecipientPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailAttributeID attrID; /* kMailFromBit thru kMailBccBit */
- MailRecipient *recipient;
- Boolean responsible; /* valid for server and message msams only */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutContentPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- MailSegmentType segmentType;
- Boolean append;
- Byte padByte;
- MailBuffer buffer;
- StScrpRec *textScrap;
- Boolean startNewScript;
- ScriptCode script; /* valid only if startNewScript is true */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutContentPB MSAMPutContentPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutEnclosurePB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- Boolean contentEnclosure;
- Byte padByte;
- Boolean hfs; /* true => in file system, false => in memory */
- Boolean append;
- MailBuffer buffer; /* Unused if hfs == true */
- FSSpec enclosure;
- MailEnclosureInfo addlInfo;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutBlockPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- long refCon; /* for messages only */
- OCECreatorType blockType;
- Boolean append;
- MailBuffer buffer;
- MailBlockMode mode; /* if blockType is kMailTunnelLtrType or kMailHopInfoType */
- /* mode is assumed to be kMailFromMark */
- unsigned long offset;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutBlockPB MSAMPutBlockPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMCreateReportPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MSAMQueueRef queueRef; /* to distinguish personal and server MSAMs */
- MailMsgRef mailMsgRef;
- MailLetterID msgID; /* kMailLetterIDBit of letter being reported upon */
- MailRecipient *sender; /* sender of the letter you are creating report on */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMCreateReportPB MSAMCreateReportPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MSAMPutRecipientReportPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailMsgRef mailMsgRef;
- short recipientIndex; /* recipient index in the original letter */
- OSErr result; /* result of sending the recipient */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailWakeupPMSAMPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- CreationID pmsamCID;
- MailSlotID mailSlotID;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailCreateMailSlotPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailboxRef mailboxRef;
- long timeout;
- CreationID pmsamCID;
- SMCA smca;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct MailModifyMailSlotPB {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- MailboxRef mailboxRef;
- long timeout;
- CreationID pmsamCID;
- SMCA smca;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
-
- #define kPMSAMGetMSAMRecord 1286
- #define kPMSAMOpenQueues 1280
- #define kPMSAMLogError 1313
- #define kPMSAMSetStatus 1319
- #define kPMSAMCreateMsgSummary 1314
- #define kPMSAMPutMsgSummary 1317
- #define kPMSAMGetMsgSummary 1318
- #define kMailWakeupPMSAM 1287
- #define kSMSAMSetup 1315
- #define kSMSAMStartup 1281
- #define kSMSAMShutdown 1282
- #define kMSAMEnumerate 1283
- #define kMSAMDelete 1284
- #define kMSAMOpen 1288
- #define kMSAMOpenNested 1289
- #define kMSAMClose 1290
- #define kMSAMGetMsgHeader 1297
- #define kMSAMnMarkRecipients 1298
- #define kMSAMGetAttributes 1291
- #define kMSAMGetRecipients 1292
- #define kMSAMGetContent 1293
- #define kMSAMGetEnclosure 1294
- #define kMSAMEnumerateBlocks 1295
- #define kMSAMGetBlock 1296
- #define kMSAMMarkRecipients 1285
- #define kMSAMCreate 1300
- #define kMSAMBeginNested 1301
- #define kMSAMEndNested 1302
- #define kMSAMSubmit 1303
- #define kMSAMPutMsgHeader 1309
- #define kMSAMPutAttribute 1304
- #define kMSAMPutRecipient 1305
- #define kMSAMPutContent 1306
- #define kMSAMPutEnclosure 1307
- #define kMSAMPutBlock 1308
- #define kMSAMCreateReport 1311
- #define kMSAMPutRecipientReport 1312
- #define kMailCreateMailSlot 1323
- #define kMailModifyMailSlot 1324
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- union MSAMParam {
- struct {
- Ptr qLink;
- long reservedH1;
- long reservedH2;
- MSAMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- } header;
- PMSAMGetMSAMRecordPB pmsamGetMSAMRecord;
- PMSAMOpenQueuesPB pmsamOpenQueues;
- PMSAMSetStatusPB pmsamSetStatus;
- PMSAMLogErrorPB pmsamLogError;
- SMSAMSetupPB smsamSetup;
- SMSAMStartupPB smsamStartup;
- SMSAMShutdownPB smsamShutdown;
- MSAMEnumeratePB msamEnumerate;
- MSAMDeletePB msamDelete;
- MSAMOpenPB msamOpen;
- MSAMOpenNestedPB msamOpenNested;
- MSAMClosePB msamClose;
- MSAMGetMsgHeaderPB msamGetMsgHeader;
- MSAMGetAttributesPB msamGetAttributes;
- MSAMGetRecipientsPB msamGetRecipients;
- MSAMGetContentPB msamGetContent;
- MSAMGetEnclosurePB msamGetEnclosure;
- MSAMEnumerateBlocksPB msamEnumerateBlocks;
- MSAMGetBlockPB msamGetBlock;
- MSAMMarkRecipientsPB msamMarkRecipients;
- MSAMnMarkRecipientsPB msamnMarkRecipients;
- MSAMCreatePB msamCreate;
- MSAMBeginNestedPB msamBeginNested;
- MSAMEndNestedPB msamEndNested;
- MSAMSubmitPB msamSubmit;
- MSAMPutMsgHeaderPB msamPutMsgHeader;
- MSAMPutAttributePB msamPutAttribute;
- MSAMPutRecipientPB msamPutRecipient;
- MSAMPutContentPB msamPutContent;
- MSAMPutEnclosurePB msamPutEnclosure;
- MSAMPutBlockPB msamPutBlock;
- MSAMCreateReportPB msamCreateReport;
- MSAMPutRecipientReportPB msamPutRecipientReport;
- PMSAMCreateMsgSummaryPB pmsamCreateMsgSummary;
- PMSAMPutMsgSummaryPB pmsamPutMsgSummary;
- PMSAMGetMsgSummaryPB pmsamGetMsgSummary;
- MailWakeupPMSAMPB wakeupPMSAM;
- MailCreateMailSlotPB createMailSlot;
- MailModifyMailSlotPB modifyMailSlot;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal OSErr MailCreateMailSlot(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1323, 0xAA5E);
- extern pascal OSErr MailModifyMailSlot(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1324, 0xAA5E);
- extern pascal OSErr MailWakeupPMSAM(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1287, 0xAA5E);
- extern pascal OSErr PMSAMOpenQueues(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1280, 0xAA5E);
- extern pascal OSErr PMSAMSetStatus(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1319, 0xAA5E);
- extern pascal OSErr PMSAMGetMSAMRecord(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1286, 0xAA5E);
- extern pascal OSErr SMSAMSetup(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1315, 0xAA5E);
- extern pascal OSErr SMSAMStartup(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1281, 0xAA5E);
- extern pascal OSErr SMSAMShutdown(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1282, 0xAA5E);
- extern pascal OSErr MSAMEnumerate(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1283, 0xAA5E);
- extern pascal OSErr MSAMDelete(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1284, 0xAA5E);
- extern pascal OSErr MSAMMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1285, 0xAA5E);
- extern pascal OSErr MSAMnMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1298, 0xAA5E);
- extern pascal OSErr MSAMOpen(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1288, 0xAA5E);
- extern pascal OSErr MSAMOpenNested(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1289, 0xAA5E);
- extern pascal OSErr MSAMClose(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1290, 0xAA5E);
- extern pascal OSErr MSAMGetRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1292, 0xAA5E);
- extern pascal OSErr MSAMGetAttributes(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1291, 0xAA5E);
- extern pascal OSErr MSAMGetContent(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1293, 0xAA5E);
- extern pascal OSErr MSAMGetEnclosure(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1294, 0xAA5E);
- extern pascal OSErr MSAMEnumerateBlocks(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1295, 0xAA5E);
- extern pascal OSErr MSAMGetBlock(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1296, 0xAA5E);
- extern pascal OSErr MSAMGetMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1297, 0xAA5E);
- extern pascal OSErr MSAMCreate(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1300, 0xAA5E);
- extern pascal OSErr MSAMBeginNested(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1301, 0xAA5E);
- extern pascal OSErr MSAMEndNested(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1302, 0xAA5E);
- extern pascal OSErr MSAMSubmit(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1303, 0xAA5E);
- extern pascal OSErr MSAMPutAttribute(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1304, 0xAA5E);
- extern pascal OSErr MSAMPutRecipient(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1305, 0xAA5E);
- extern pascal OSErr MSAMPutContent(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1306, 0xAA5E);
- extern pascal OSErr MSAMPutEnclosure(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1307, 0xAA5E);
- extern pascal OSErr MSAMPutBlock(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1308, 0xAA5E);
- extern pascal OSErr MSAMPutMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1309, 0xAA5E);
- extern pascal OSErr MSAMCreateReport(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1311, 0xAA5E);
- extern pascal OSErr MSAMPutRecipientReport(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1312, 0xAA5E);
- extern pascal OSErr PMSAMLogError(MSAMParam *paramBlock)
- FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1313, 0xAA5E);
- extern pascal OSErr PMSAMCreateMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1314, 0xAA5E);
- extern pascal OSErr PMSAMPutMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1317, 0xAA5E);
- extern pascal OSErr PMSAMGetMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
- THREEWORDINLINE(0x3f3c, 1318, 0xAA5E);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-